package com.tianyiyan.hibernate.tyenword;

import java.util.HashSet;
import java.util.Set;

public class Phrase extends Vocabulary
{
	private Set<PhraseMeaning> meanings = new HashSet<PhraseMeaning>();
	public Set<PhraseMeaning> getMeanings() {
		return meanings;
	}
	public void setMeanings(Set<PhraseMeaning> meanings) {
		this.meanings = meanings;
	}
	public Phrase(){}
	public Phrase(Integer id)
	{
		this.id = id;
	}
	@Override
	public String toString() {
		return "Phrase [id=" + id + ", val=" + val + ", unit=" + unit
				+ ", book=" + book + "]";
	}
	public String getMeaningCnStr()
	{
		String result = "";
		for (PhraseMeaning m : meanings)
		{
			result += m.getMeaningCn() + '\n';
		}
		return result;
	}
}
